Video games and virtual environments in which sky, mountains, and other objects in the general background of a scene must be portrayed are typically represented with geometry and textures that are static and unchanging and thus often appear flat and unimpressive. The background of a virtual environment is often referred to as a “sky box,” because it usually includes at least some portion of the sky and in three dimensions, surrounds a virtual viewpoint like a cube or box. Objects such as clouds may be scrolled across the background to provide some improvement in realism, but the result can still appear very unrealistic. For example, if the virtual reality is supposed to represent the environment over a period of time during the day, an observer in the virtual environment would expect the lighting to change in a realistic manner corresponding to that period of time. For example, there should be a sunrise in the morning, which might appear as a yellow band along the horizon, with red mid bands, fading through a gradient into a dark blue sky above and gray to black in the foreground. At midday, the sky might appear a light blue color with darker blue above, and as evening approaches, the sunset might be represented as a band of reddish orange fading into dark blue above. Furthermore, the transition between these lighting conditions should change dynamically as time passes during the day. Since time can be compressed in a video game or virtual environment, the change in lighting conditions in a sky box will typically be readily apparent to a viewer, so that the added realism can provide a much more satisfying experience than the typical static lighting background provided in most games or virtual environment.
Currently, to achieve different light effects in a sky box, it is necessary to provide a bit map of the background for each different lighting condition, which can quickly increase the amount of storage for the game files required on a user's hard drive. Also, if only two or three different bit maps are used, rendering each new bitmap does not provide a gradually changing lighting in the sky box, since as each bit map is rendered, there is a sudden change in the appearance of the background as the lighting conditions and colors in one bitmap replace those of another. Such a sudden change in the lighting will appear unrealistic. Alternatively, one bit map can be made to “cross fade” into another, but the result is again not very realistic, unless the changes between successive bit maps is made relatively slight, so that the transitions are not apparent. However, as the number of bitmaps used increases, the requirements for storage space for the bitmap files also increases. In consideration of these problems, it will be apparent that there is a need for a more efficient and more realistic method of providing sky box lighting that changes dynamically. It should not be necessary to provide different bitmaps of the background for each different time of day that will be displayed. The approach employed should also be applicable to display backgrounds that are dynamically varying in response to parameters other than time.